<!-- inc:header -->
<div class="notice"><div class="p">
	<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td><span class="lead">&nbsp;&raquo; <a href="{:site_url('cate')}">分类管理</a> &raquo; 添加/编辑信息</span></td>
	</tr>
	</table>
</div></div>

<form method="post" action="{:site_url('cate,setok')}id={:$id}" onsubmit="return to_submit();">

<div class="table">
	<div class="left"><span class="red">*</span> 分类名称：</div>
	<table cellpadding="0" cellspacing="0">
	<tr>
		<td><input type="text" name="cate_name" id="cate_name" class="long_input" value="{:$rs[cate_name]}"></td>
		<td>&nbsp;</td>
		<td><input type="checkbox" name="status" id="status"{if($rs[status] || !$id)} checked{end} /></td>
		<td class="clue_on">&nbsp;设置未审核请将勾去掉</td>
	</tr>
	</table>
</div>

<div class="table">
	<div class="left"><span class="red">*</span> 标识串：</div>
	<input type="text" name="identifier" id="identifier" value="{:$rs[identifier]}"{if($id)} disabled{end}>
	<span class="clue_on"> <!-- if($id) -->标识串不允许修改<!-- else -->限字母、下划线及数字，且必须是字母开头<!-- end --></span>
</div>

<!-- if(!$id) -->
<div class="table">
	<div class="left"><span class="red">*</span> 父级分类：</div>
	{:$cate_html}
	<span class="clue_on"> 分类一经确定后，不允许直接修改</span>
</div>
<!-- else -->
<div class="table">
	<div class="left"><span class="red">*</span> 父级分类：</div>
	<select disabled><option>父级类不允许直接修改</option></select>
</div>
<!-- end -->

<div class="table">
	<div class="left">风格：</div>
	<select name="tpl_id" id="tpl_id">
		<option value="0">系统默认</option>
		<!-- $tpl_list AS $key=>$value -->
		<option value="{:$value[id]}"{if($rs[tpl_id] == $value['id'])} selected{end}>{:$value[title]}</option>
		<!-- end -->
	</select>
</div>

<div class="table">
	<div class="left">SEO关键字：</div>
	<input type="text" name="keywords" id="keywords" value="{:$rs[keywords]}" class="long_input">
	<span class="clue_on"></span>
</div>

<div class="table">
	<div class="left">&nbsp;</div>
	<span class="clue_on">这些信息将在title中的keywords体现，多个关键字请用英文逗号隔开</span>
</div>

<div class="table">
	<div class="left">SEO描述：</div>
	<input type="text" name="description" id="description" value="{:$rs[description]}" class="long_input">
	<span class="clue_on">内容描述，仅限SEO使用</span>
</div>

<div class="table">
	<div class="left">简要描述：</div>
	<textarea id="note" name="note" class="long_input" style="height:50px;">{:$rs[note]}</textarea>
</div>

<div class="table">
	<div class="left">显示：</div>
	<input type="radio" name="if_hidden" value="0"{if(!$rs[if_hidden])} checked{end} /> 显示
	&nbsp; 
	<input type="radio" name="if_hidden" value="1"{if($rs[if_hidden])} checked{end} /> 隐藏
	<span class="clue_on"> 隐藏后不体现，但用户仍可通过网址直接访问</span>
</div>

<div class="table">
	<div class="left">是否封面：</div>
	<input type="checkbox" name="if_index" value="1"{if($rs[if_index])} checked{end} />
	<span class="clue_on"> 启用封面后，添加的数据不要放在这个分类中，模块启用“<span class="red">分类至主题</span>”时无效！</span>
</div>

<div class="table">
	<div class="left">游客发布：</div>
	<input type="radio" name="ifguest" value="0"{if(!$rs[ifguest])} checked{end} /> 禁用
	&nbsp; 
	<input type="radio" name="ifguest" value="1"{if($rs[ifguest])} checked{end} /> 允许
	&nbsp; &nbsp;
	<input type="checkbox" name="chk_guest" value="1"{if($rs[chk_guest])} checked{end} /> 免审核
	<span class="clue_on"> 只有所选的模块支持游客发布此参数才有效</span>
</div>

<div class="table">
	<div class="left">会员发布：</div>
	<input type="radio" name="ifuser" value="0"{if(!$rs[ifuser])} checked{end} /> 禁用
	&nbsp; 
	<input type="radio" name="ifuser" value="1"{if($rs[ifuser])} checked{end} /> 允许
	&nbsp; &nbsp;
	<input type="checkbox" name="chk_user" value="1"{if($rs[chk_user])} checked{end} /> 免审核
	<span class="clue_on"> 只有所选的模块支持会员发布此参数才有效</span>
</div>

<div class="table">
	<div class="left">主题评论：</div>
	<input type="radio" name="ifreply" value="0"{if(!$rs[ifreply])} checked{end} /> 禁止
	&nbsp; 
	<input type="radio" name="ifreply" value="1"{if($rs[ifreply])} checked{end} /> 允许
	&nbsp; &nbsp;
	<input type="checkbox" name="chk_reply" value="1"{if($rs[chk_reply])} checked{end} /> 免审核
	<span class="clue_on"> 只有所选的模块支持回复时才有效</span>
</div>

<div class="table">
	<div class="left">点评：</div>
	<input type="radio" name="if_hits" value="0"{if(!$rs[if_hits])} checked{end} /> 禁止
	&nbsp; 
	<input type="radio" name="if_hits" value="1"{if($rs[if_hits])} checked{end} /> 允许
	<span class="clue_on"> 只有所选的模块支持点评时才有效</span>
</div>

<div class="table">
	<div class="left">前台默认图片：</div>
	<select name="inpic" id="inpic">
	<option value="">不关联，单独获取</option>
	<!-- $gdlist AS $key=>$value -->
	<option value="{:$value[pictype]}"{if($rs[inpic] == $value[pictype])} selected{end}>关联：{:$value[picsubject]}</option>
	<!-- end -->
	</select>
	<span class="clue_on">&nbsp;不支持缩略图的模块，此参数无效</span>
</div>


<div class="table">
	<div class="left">分页数量：</div>
	<input type="text" name="psize" id="psize" value="{:$rs[psize] ? $rs[psize] : '30'}" class="short_input">
	<span class="clue_on"> 范围1-255，建议设置为30</span>
</div>


<div class="table">
	<div class="left">排序：</div>
	<input type="text" name="taxis" id="taxis" value="{:$rs[taxis] ? $rs[taxis] : '255'}" class="short_input">
	<span class="clue_on"> 范围0-255，值越小越往前靠</span>
</div>

<div class="table">
	<div class="left">链接网址：</div>
	<input type="text" name="linkurl" id="linkurl" class="long_input" value="{:$rs[linkurl]}">
	<select name="target" id="target">
	<option value="0">当前窗口</option>
	<option value="1"{if($rs[target])} selected{end}>新窗口</option>
	</select>
</div>

<div class="table">
	<div class="left">数据排序：</div>
	<select name="ordertype" id="ordertype">
	<!-- $order_list AS $key=>$value -->
	<option value="{:$key}"{if($rs[ordertype] == $key)} selected{end}>{:$value}</option>
	<!-- end -->
	</select>
	<span class="clue_on"> 主题置顶及自定义排序优先此排序</span>
</div>

<div class="table">
	<div class="left">封面模板：</div>
	<input type="text" name="tpl_index" id="tpl_index" value="{:$rs[tpl_index]}">
	<span class="clue_on"> 不带后缀，不设置将使用系统自带封面模板，格式为：index_模块标识串</span>
</div>

<div class="table">
	<div class="left">列表模板：</div>
	<input type="text" name="tpl_list" id="tpl_list" value="{:$rs[tpl_list]}">
	<span class="clue_on"> 不带后缀，不设置将使用系统自带封面模板，格式为：list_模块标识串</span>
</div>

<div class="table">
	<div class="left">内容模板：</div>
	<input type="text" name="tpl_file" id="tpl_file" value="{:$rs[tpl_file]}">
	<span class="clue_on"> 不带后缀，不设置将使用系统自带封面模板，格式为：msg_模块标识串</span>
</div>


<div class="table">
	<div class="left">&nbsp;</div>
	<input type="submit" class="button" id="_phpok_submit" name="article_submit" value=" 提交 ">
</div>

</form>

<script type="text/javascript">
function to_submit()
{
	var cate_name = getid("cate_name").value;
	if(!cate_name)
	{
		alert("分类名称不允许为空");
		getid("cate_name").focus();
		return false;
	}
	<!-- if(!$id) -->
	var identifier = getid("identifier").value;
	if(!identifier)
	{
		alert("标识串不允许为空");
		return false;
	}
	var url = get_url("cate,chk")+"sign="+identifier;
	var msg = get_ajax(url);
	if(!msg) msg = "error: 操作非法";
	if(msg != "ok")
	{
		alert(msg);
		getid("identifier").focus();
		return false;
	}
	var cate_id = getid("cate_id").value;
	if(!cate_id)
	{
		alert("请选择父级分类");
		return false;
	}
	<!-- end -->
	getid("_phpok_submit").disabled = true;
}
</script>
<!-- inc:footer -->